{% extends "ads/base.html" %}

{% load i18n %}

{% block title %}{{ website }} | {% trans "Website" %} | {{ block.super }}{% endblock %}

{% block h1 %}{% trans "Website Creation/Edition" %}{% endblock %}

{% block body %}

<div class="clear_both">
    <div class="box olive panel">
        <table class="form">
            <tr>
                <th>{% trans "Name" %}</th>
                <td>{{ website }}</td>
            </tr>
            <tr>
                <th>{% trans "URL" %}</th>
                <td><a href="{{ website.url }}">{{ website.url }}</a></td>
            </tr>
        </table>
    </div>

    <div class="box orange">
        <a href="create_adbox/">{% trans "Create a new AdBox" %}</a>
    </div>

    <div class="box green">
        <a href="edit/">{% trans "Edit" %}</a>
    </div>
</div>

<div class="box silver clear_both">
    <h2>{% trans "AdBoxes" %}</h2>

    {% if website.ad_boxes.count %}
    <ul>
        {% for ad_box in website.ad_boxes.all %}
        <li><a href="{{ ad_box.get_absolute_url }}">{{ ad_box }}</a></li>
        {% endfor %}
    </ul>
    {% else %}
    {% trans "This website has no ad boxes!" %}
    {% endif %}
</div>

{% endblock body %}

